/*
 * @Author: quit
 * @Date: 2021-11-16 10:16:22
 * @LastEditTime: 2021-12-11 15:45:03
 * @Descripttion: 项目后台管理
 */

/* 项目后台管理布局组件 */
import BotLayout from '@/layout/BOTAdmin'
// 项目后台管理路由表
export default [
  { path: '/BotHome', redirect: '/Construction' },

  {
    path: '/Construction',
    component: BotLayout,
    //  name: 'Construction',
    children: [
      {
        path: '',
        component: () => import('@/views/BotView/Construction'),
        name: 'Construction',
        meta: { title: '项目建筑管理', icon: 'construction', affix: true }
      }
    ]
  },

  {
    path: '/ImageManagement',
    component: BotLayout,
    // name: 'ImageManagement',
    children: [
      {
        path: '',
        component: () => import('@/views/BotView/ImageManagement'),
        name: 'ImageManagement',
        meta: { title: '图片管理', icon: 'images' }
      }
    ]
  },

  {
    path: '/MenuManagement',
    component: BotLayout,
    // name: 'MenuManagement',
    redirect: '/MenuManagement/SystemMenu',
    meta: { title: '菜单管理', icon: 'menu-manager' },
    children: [
      {
        path: 'SystemMenu',
        component: () => import('@/views/BotView/MenuManagement/SystemMenu'),
        name: 'SystemMenu',
        meta: { title: '系统菜单', icon: 'system-menu' }
      },
      {
        path: 'UserPage',
        component: () => import('@/views/BotView/MenuManagement/UserPage'),
        name: 'UserPage',
        meta: { title: '用户页面', icon: 'page' }
      }
    ]
  },

  {
    path: '/SubsysManager',
    component: BotLayout,
    // name: 'SubsysManager',
    redirect: '/SubsysManager/SubModeManager',
    meta: { title: '类型管理', icon: 'type' },
    children: [
      {
        path: 'SubModeManager',
        component: () => import('@/views/BotView/SubsysManager/SubModeManager'),
        name: 'SubModeManager',
        meta: { title: '类型模板', icon: 'mode' }
      },
      {
        path: 'SubDrandItem',
        component: () => import('@/views/BotView/SubsysManager/SubDrandItem'),
        name: 'SubDrandItem',
        meta: { title: '设备类型状态', icon: 'state' }
      },
      {
        path: 'SubModeChart',
        component: () => import('@/views/BotView/SubsysManager/SubModeChart'),
        name: 'SubModeChart',
        meta: { title: '结构图', icon: 'edit-mode' }
      }
    ]
  },

  {
    path: '/DeviceManagement',
    component: BotLayout,
    // name: '/DeviceManagement',
    redirect: '/DeviceManagement/index',
    meta: { title: '设备管理', icon: 'device-manager' },
    children: [
      {
        path: 'index',
        component: () => import('@/views/BotView/DeviceManagement/index'),
        name: 'DeviceManagement',
        meta: { title: '设备管理', icon: 'device-manager' }
      },
      {
        path: 'AssetAttributes',
        component: () => import('@/views/BotView/DeviceManagement/AssetAttributes'),
        name: 'AssetAttributes',
        meta: { title: '资产属性', icon: 'asset-attributes' }
      }
    ]
  },

  {
    path: '/TagManagement',
    component: BotLayout,
    // name: 'TagManagement',
    children: [
      {
        path: '',
        component: () => import('@/views/BotView/TagManagement'),
        name: 'TagManagement',
        meta: { title: '变量管理', icon: 'tag-manager' }
      }
    ]
  },

  {
    path: '/PageEditor',
    component: BotLayout,
    // name: 'PageEditor',
    children: [
      {
        path: '',
        component: () => import('@/views/BotView/PageEditor'),
        name: 'PageEditor',
        meta: { title: '页面编辑', icon: 'page-editor' }
      }
    ]
  },

  {
    path: '/EnergyConsumptionConfig',
    component: BotLayout,
    // name: 'EnergyConsumptionConfig',
    meta: { title: '能耗配置', icon: 'energy-consumption' },
    children: [
      {
        path: 'TypeManagement',
        component: () => import('@/views/BotView/EnergyConsumptionConfig/TypeManagement'),
        name: 'TypeManagement',
        meta: { title: '类型管理', icon: 'type-manager' }
      },
      {
        path: 'TypeConfig',
        component: () => import('@/views/BotView/EnergyConsumptionConfig/TypeConfig'),
        name: 'TypeConfig',
        meta: { title: '类型配置', icon: 'type-config' }
      },
      {
        path: 'TargetManagement',
        name: 'TargetManagement',
        component: () => import('@/views/BotView/EnergyConsumptionConfig/TargetManagement/index'),
        meta: { title: '指标管理', icon: 'target-manager' },
        children: [
          {
            path: 'EnergyUsing',
            component: () => import('@/views/BotView/EnergyConsumptionConfig/TargetManagement/EnergyUsing'),
            name: 'EnergyUsing',
            meta: { title: '用能指标', icon: 'energy-using' }
          },
          {
            path: 'TargetContent',
            component: () => import('@/views/BotView/EnergyConsumptionConfig/TargetManagement/TargetContent'),
            name: '',
            meta: { title: '指标内容', icon: 'target-content' }
          }
        ]
      }
    ]
  },

  {
    path: '/PermissionGroupManagement',
    component: BotLayout,
    // name: 'PermissionGroupManagement',
    redirect: '/PermissionGroupManagement/EditPermissionGroup',
    meta: { title: '权限组管理', icon: 'permission-group' },
    children: [
      {
        path: 'EditPermissionGroup',
        component: () => import('@/views/BotView/EditPermissionGroup'),
        name: 'EditPermissionGroup',
        meta: { title: '编辑权限组', icon: 'edit-permission-group' }
      },
      {
        path: 'MenuPermissions',
        component: () => import('@/views/BotView/MenuPermissions'),
        name: 'MenuPermissions',
        meta: { title: '菜单权限', icon: 'menu-permissions' }
      },
      {
        path: 'EquipmentPermissions',
        component: () => import('@/views/BotView/EquipmentPermissions'),
        name: 'EquipmentPermissions',
        meta: { title: '设备权限', icon: 'equipment-permissions' }
      }
    ]
  }
]
